﻿////-----------------------------------------------------------------------
//// <copyright file="IAuthorizationService.cs" company="Alan Rodrigues">
////     Copyright (c) Alan Rodrigues. All rights reserved.
//// </copyright>
//// <developed>Alan Rodrigues (operninha@gmail.com)</developed>
////-----------------------------------------------------------------------
//using System;
//using System.ServiceModel;
//using System.ServiceModel.Web;

//namespace Authorization
//{

//    [ServiceContract(Name = "AuthorizationServiceJson", Namespace = "http://authorizationservices/json/v1")]
//    [DataContractFormat(Style = OperationFormatStyle.Document)]
//    public interface IAuthorizationServiceJson
//    {
//        #region OperationCollection
//        ///<summary>
//        ///</summary>
//        ///<param name="applicationName"></param>>
//        ///<returns></returns>
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [OperationContract(Name = "GetAllOperations")]
//        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        //UriTemplate = "{applicationName}/Operations/All")]
//        OperationCollection GetAllOperations(string applicationName);

//        [OperationContract(Name = "GetOperation")]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        //UriTemplate = "{applicationName}/Operations/?operationName={operationName}")]
//        Operation GetOperation(string applicationName, string operationName);

//        [OperationContract(Name = "CreateOperation")]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        //UriTemplate = "Operations/{applicationName}/Create/?name={operationName}&description={description}&id={operationId}")]
//        Operation CreateOperation(string applicationName, string operationName, string description, int operationId);

//        [OperationContract(Name = "OperationExists")]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//         //UriTemplate = "{applicationName}/Operations/{operationName}/Exists")]
//        //[XmlSerializerFormat(Style = OperationFormatStyle.Document, Use = OperationFormatUse.Literal)]
//        bool OperationExists(string applicationName, string operationName);

//        [OperationContract(Name = "DeleteOperation", IsOneWay = false)]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "POST",
//         RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        // UriTemplate = "{applicationName}/Operations/{operationName}/Delete")]
//        void DeleteOperation(string applicationName, string operationName);

//        [OperationContract(Name = "UpdateOperation", IsOneWay = false)]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "POST",
//         RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        //UriTemplate = "{applicationName}/Operations/{operationName}/Update/")]
//        void UpdateOperation(string applicationName, string operationName, string newOperationName,
//                             string newOperationDescription, int newOperationId);

//        #endregion

//        #region TaskCollection

//        [OperationContract(Name = "GetAllTasks")]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "GET",
//         RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        // UriTemplate = "{applicationName}/Tasks/{scopeName}/All")]
//        TaskCollection GetAllTasks(string applicationName, string scopeName);

//        ///<summary>
//        /// Retorna os names dos <see cref="RoleCollection"/> da <see cref="Application"/>
//        ///</summary>
//        ///<param name="applicationName">Name da <see cref="Application"/></param>
//        ///<param name="scopeName">Name do <see cref="Scope"/></param>
//        ///<returns>Lista com os names das <see cref="OperationCollection"/></returns>
//        [OperationContract(Name = "GetAllTaskNames")]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        string[] GetAllTaskNames(string applicationName, string scopeName);

//        [OperationContract(Name = "GetTask")]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        Task GetTask(string applicationName, string scopeName, string taskName);

//        [OperationContract(Name = "CreateTask")]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        Task CreateTask(string applicationName, string scopeName, string taskName, string description);

//        [OperationContract(Name = "DeleteTask", IsOneWay = false)]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        void DeleteTask(string applicationName, string scopeName, string taskName);

//        [OperationContract(Name = "UpdateTask", IsOneWay = false)]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        void UpdateTask(string applicationName, string scopeName, string taskName, string newTaskName, string newDescription);

//        [OperationContract(Name = "TaskExists")]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        //[XmlSerializerFormat(Style = OperationFormatStyle.Document, Use = OperationFormatUse.Literal)]
//        bool TaskExists(string applicationName, string taskName);
//        #endregion

//        #region RoleCollection

//        [OperationContract(Name = "GetAllRoles")]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        RoleCollection GetAllRoles(string applicationName, string scopeName);

//        ///<summary>
//        /// Retorna os names dos <see cref="RoleCollection"/> da <see cref="Application"/>
//        ///</summary>
//        ///<param name="applicationName">Name da <see cref="Application"/></param>
//        ///<param name="scopeName">Name do <see cref="Scope"/></param>
//        ///<returns>Lista com os names das <see cref="OperationCollection"/></returns>
//        [OperationContract(Name = "GetAllRoleNames")]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        string[] GetAllRoleNames(string applicationName, string scopeName);

//        [OperationContract(Name = "GetRole")]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        Role GetRole(string applicationName, string scopeName, string roleName);

//        [OperationContract(Name = "RoleExists")]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        bool RoleExists(string applicationName, string scopeName, string roleName);

//        [OperationContract(Name = "CreateRole")]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        Role CreateRole(string applicationName, string scopeName, string roleName, string description);

//        [OperationContract(Name = "DeleteRole", IsOneWay = false)]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        void DeleteRole(string applicationName, string scopeName, string roleName);

//        [OperationContract(Name = "UpdateRole", IsOneWay = false)]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        void UpdateRole(string applicationName, string scopeName, string roleName, string newRoleName, string newDescription);

//        #endregion

//        #region ScopeCollection

//        [OperationContract(Name = "GetAllScopes")]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        ScopeCollection GetAllScopes(string applicationName);

//        [OperationContract(Name = "GetScope")]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        Scope GetScope(string applicationName, string scopeName);

//        /// <summary>
//        ///  Retorna os names dos <see cref="ScopeCollection"/> da <see cref="Application"/>
//        /// </summary>
//        /// <param name="applicationName">Name da <see cref="Application"/></param>
//        /// <returns>Lista com os names dos <see cref="ScopeCollection"/></returns>
//        [OperationContract(Name = "GetAllScopeNames")]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        string[] GetAllScopeNames(string applicationName);

//        [OperationContract(Name = "ScopeExists")]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        bool ScopeExists(string applicationName, string scopeName);

//        [OperationContract(Name = "CreateScope")]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        Scope CreateScope(string applicationName, string scopeName, string description);

//        [OperationContract(Name = "DeleteScope", IsOneWay = false)]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        void DeleteScope(string applicationName, string scopeName);

//        [OperationContract(Name = "UpdateScope", IsOneWay = false)]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        void UpdateScope(string applicationName, string scopeName, string newScopeName, string newDescription);

//        #endregion

//        #region ApplicationCollection

//        /// <summary>
//        /// Retorna <see cref="ApplicationCollection"/>
//        /// </summary>
//        /// <returns>Lista de <see cref="ApplicationCollection"/></returns>
//        [OperationContract(Name = "GetAllApplications")]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        ApplicationCollection GetAllApplications();

//        /// <summary>
//        /// Retorna <see cref="Application"/>
//        /// </summary>
//        /// <returns><see cref="Application"/></returns>
//        [OperationContract(Name = "GetApplication")]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        Application GetApplication(string applicationName);

//        /// <summary>
//        ///  Retorna os names dos <see cref="ScopeCollection"/> da <see cref="Application"/>
//        /// </summary>
//        /// <returns>Lista com os names dos <see cref="ScopeCollection"/></returns>
//        [OperationContract(Name = "GetAllApplicationNames")]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        string[] GetAllApplicationNames();

//        [OperationContract(Name = "ApplicationExists")]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        bool ApplicationExists(string applicationName);

//        //[OperationContract(Name = "CreateApplication")]
//        //[FaultContract(typeof(ArgumentNullException))]
//        //[FaultContract(typeof(AuthorizationServiceError))]
//        //[WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json,
//        // ResponseFormat = WebMessageFormat.Json,
//        // BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        //Task CreateApplication(string applicationName, string description, string version);

//        //[OperationContract(Name = "DeleteApplication", IsOneWay = false)]
//        //[FaultContract(typeof(ArgumentNullException))]
//        //[FaultContract(typeof(AuthorizationServiceError))]
//        //[WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json,
//        // ResponseFormat = WebMessageFormat.Json,
//        // BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        //void DeleteApplication(string applicationName);

//        //[OperationContract(Name = "UpdateApplication", IsOneWay = false)]
//        //[FaultContract(typeof(ArgumentNullException))]
//        //[FaultContract(typeof(AuthorizationServiceError))]
//        //[WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json,
//        // ResponseFormat = WebMessageFormat.Json,
//        // BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        //void UpdateApplication(string applicationName, string newApplicationName, string newDescription, string newVersion);

//        #endregion


//        #region Store

//        //[OperationContract(Name = "GetAllStoreNames")]
//        //[FaultContract(typeof(AuthorizationServiceError))]
//        //[WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json,
//        // ResponseFormat = WebMessageFormat.Json,
//        // BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        //string[] GetAllStoreNames();

//        //[OperationContract(Name = "GetDefaultStoreName")]
//        //[FaultContract(typeof(AuthorizationServiceError))]
//        //[WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json,
//        // ResponseFormat = WebMessageFormat.Json,
//        // BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        //string GetDefaultStoreName();

//        [OperationContract(Name = "UpdateServiceCache")]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        void UpdateServiceCache();

//        #endregion
        
//        #region IUserAuthorizationService
//        ///<summary>
//        /// Gets <see cref="OperationCollection"/> from <see cref="ApplicationCollection"/> to authenticated user
//        ///</summary>
//        ///<param name="userName"></param>
//        ///<param name="applicationName"> <see cref="Application"/> name</param>
//        /// <param name="scopeName">returns operationIds from the <see cref="Scope"/>, null will return from azmanApplication root</param>
//        ///<returns><see cref="OperationCollection"/> from choosen azmanApplication and scope</returns>
//        [OperationContract(Name = "GetOperationsForUser")]
//        [FaultContract(typeof(ArgumentNullException))]
//        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        OperationCollection GetOperationsForUser(string userName, string applicationName, string scopeName);

//        [OperationContract(Name = "GetTasksForUser")]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        TaskCollection GetTasksForUser(string userName, string applicationName, string scopeName);

//        [OperationContract(Name = "GetRolesForUser")]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        RoleCollection GetRolesForUser(string userName, string applicationName, string scopeName);

//        [OperationContract(Name = "GetRoleNamesForUser")]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        string[] GetRoleNamesForUser(string userName, string applicationName, string scopeName);

//        [OperationContract(Name = "IsUserInRole")]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        bool IsUserInRole(string userName, string applicationName, string scopeName, string roleName);

//        [OperationContract(Name = "AccessCheck")]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        //[XmlSerializerFormat(Style = OperationFormatStyle.Document, Use = OperationFormatUse.Literal)]
//        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//        BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        bool AccessCheck(string userName, string applicationName, int operationId, string scopeName);


//        //TODO: Adicionar opcoes para verificar por role e outras informacoes...

//        [OperationContract(Name = "AccessCheckByName")]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        //[XmlSerializerFormat(Style = OperationFormatStyle.Document, Use = OperationFormatUse.Literal)]
//        [WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json,
//        ResponseFormat = WebMessageFormat.Json,
//        BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        bool AccessCheck(string userName, string applicationName, string operationName, string scopeName);

//        [OperationContract(Name = "BulkAccessCheck")]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        int[] AccessCheck(string userName, string applicationName, int[] operationIds, string[] scopeNames);

//        [OperationContract(Name = "BulkAccessCheckByName")]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json,
//         ResponseFormat = WebMessageFormat.Json,
//         BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        OperationCollection AccessCheck(string userName, string applicationName, string[] operationNames, string[] scopeNames);

//        [OperationContract(Name = "BulkAccessCheckWithRules")]
//        [FaultContract(typeof(ArgumentNullException))]
//        [FaultContract(typeof(AuthorizationServiceError))]
//        //[XmlSerializerFormat(Style = OperationFormatStyle.Document, Use = OperationFormatUse.Literal)]
//        [WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json,
//        ResponseFormat = WebMessageFormat.Json,
//        BodyStyle = WebMessageBodyStyle.WrappedRequest)]
//        bool AccessCheck(string userName, string applicationName, int operationId, string scopeName, string[] variableNames, object[] variableValues);
//        #endregion
//    }
//}
